# Contributor: Damian Kurek <starfire24680@gmail.com>
# Maintainer: Damian Kurek <starfire24680@gmail.com>
pkgname=kodi-vfs-sftp
pkgver=19.0.1
_realname=Matrix
pkgrel=0
pkgdesc="SFTP VFS add-on for Kodi"
options="!check" # no test suite
url="https://github.com/xbmc/vfs.sftp"
arch="x86 x86_64 aarch64 armv7" # kodi is available only on those arches
license="GPL-2.0-only"
makedepends="cmake libssh-dev kodi-dev"
source="$pkgname-$pkgver-$_realname.tar.gz::https://github.com/xbmc/vfs.sftp/archive/$pkgver-$_realname.tar.gz"
builddir="$srcdir/vfs.sftp-$pkgver-$_realname"

build() {
	cmake -B build \
		-DCMAKE_BUILD_TYPE=None \
		-DCMAKE_INSTALL_PREFIX=/usr \
		-DCMAKE_MODULE_PATH=/usr/lib/cmake/kodi \
		-DUSE_LTO=1
	cmake --build build
}

package() {
	DESTDIR="$pkgdir" cmake --install build
}

sha512sums="
e8844c510b6849a503a9887649ae81458dbece366e8fe9d700076333f67aff6e67465246fde3faedd072adee05c280a20a9029cc702fd34b6d3db137e3c6154d  kodi-vfs-sftp-19.0.1-Matrix.tar.gz
"
